import {
	listdeploytypeoptions,
	listdeploykubenetesnameoptions
} from '@/api/deploy'
const store = {
	state: {
		deployTypeOptions: {},
		deploykubenetesnameoptions: {}
	},
	getters: {
		getDeployTypeOptions(state) {
			return state.deployTypeOptions
		},
		getDeploykubenetesnameoptions(state) {
			return state.deploykubenetesnameoptions
		}
	},
	mutations: {
		UPDATE_DEPLOYTYPE_OPTIONS(state, data) {
			state.deployTypeOptions = data
		},
		UPDATE_DEPLOYKUBENETESNAME_OPTIONS(state, data) {
			state.deploykubenetesnameoptions = data
		}
	},
	actions: {
		setDeployTypeOptions({
			commit
		}) {
// 			listequimentType()
// 				.then((response => {
// 					console.log("response: " + response);
// 					commit('UPDATE_EQUIPMENTTYPE_OPTIONS', response)
// 				}))
			let data = listdeploytypeoptions()
			commit('UPDATE_DEPLOYTYPE_OPTIONS', data)
		},
		setDeploykubenetesnameoptions({
					commit
				}) {
		// 			listequimentType()
		// 				.then((response => {
		// 					console.log("response: " + response);
		// 					commit('UPDATE_EQUIPMENTTYPE_OPTIONS', response)
		// 				}))
					let data = listdeploykubenetesnameoptions()
					commit('UPDATE_DEPLOYKUBENETESNAME_OPTIONS', data)
				}
			
	}
}

export default store
